package hu.myandroidlife.activity;

import hu.myandroidlife.AnimationActivity;
import hu.myandroidlife.R;
import hu.myandroidlife.TempTestActivity;
import hu.myandroidlife.base.BaseActivity;
import android.view.View;
import android.widget.Button;

public class MainActivity extends BaseActivity {

	private Button btnTempTest;
	private Button btnEditTextMonitor;
	private Button btnAdapterLearn;
	private Button btnQR_Code;
	private Button btnProgress;
	private Button btnWaterView;
	private Button btnDialog;
	private Button btnIosDateSelect;
	private Button btnAnimation;


	@Override
	protected int getLayoutId() {
		return R.layout.activity_main;
	}

	@Override
	public void initView() {
		btnTempTest = $findViewById(R.id.btnTempTest);
		btnEditTextMonitor = $findViewById(R.id.btnEditTextMonitor);
		btnAdapterLearn = $findViewById(R.id.btnAdapterLearn);
		btnQR_Code = $findViewById(R.id.btnQR_Code);
		btnProgress = $findViewById(R.id.btnProgress);
		btnWaterView = $findViewById(R.id.btnWaterView);
		btnDialog = $findViewById(R.id.btnDialog);
		btnIosDateSelect = $findViewById(R.id.btnIosDateSelect);
		btnAnimation = $findViewById(R.id.btnAnimation);
	}

	@Override
	public void initListener() {
		btnTempTest.setOnClickListener(this);
		btnEditTextMonitor.setOnClickListener(this);
		btnAdapterLearn.setOnClickListener(this);
		btnQR_Code.setOnClickListener(this);
		btnProgress.setOnClickListener(this);
		btnWaterView.setOnClickListener(this);
		btnDialog.setOnClickListener(this);
		btnIosDateSelect.setOnClickListener(this);
		btnAnimation.setOnClickListener(this);
	}

	@Override
	public void widgetClick(View v) {
		switch (v.getId()) {
		case R.id.btnTempTest:
			$openActivity(TempTestActivity.class, null);
			break;
		case R.id.btnEditTextMonitor:
			$openActivity(EditTextMonitorActivity.class, null);
			break;
		case R.id.btnAdapterLearn:
			$openActivity(AdapterLearnActivity.class, null);
			break;
		case R.id.btnQR_Code:
			$openActivity(QR_CodeActivity.class, null);
			break;
		case R.id.btnProgress:
			$openActivity(ProgressActivity.class, null);
			break;
		case R.id.btnWaterView:
			$openActivity(WaterViewActivity.class, null);
			break;
		case R.id.btnDialog:
			$openActivity(DialogActivity.class, null);
			break;
		case R.id.btnIosDateSelect:
			$openActivity(IosDateSelectActivity.class, null);
			break;
		case R.id.btnAnimation:
			$openActivity(AnimationActivity.class, null);
			break;
		default:
			break;
		}
	}
}
